Method for processing structured data using an object-oriented computer language

ABSTRACT

The invention concerns a data processing method comprising the following steps: a)receiving a set of structured and mutually linked data to be processed, of the value type with a name and/or container with a name and capable of containing at least a value having a name and/or another container having a name; b) defining a dictionary object adapted to store/find in a memory workspace a container or a value under/corresponding to a predetermined name; c) generating an empty instance of the dictionary object; d) verifying whether the structure of the data to be processed is of the value or container type; e) if the data is of the value type, storing/finding the value in the memory workspace under/corresponding to the name of the data to be processed, and returning to step d) until the last data to be processed of said set whereas if the data is of the container type, generating an empty dictionary subobject as per step c), filling the dictionary subobject with the content of the data to be processed as per step c) to e), and returning to step d) until the last data of the set has been processed.

[0001] The present invention overcomes these disadvantages.

[0002] It relates to processing of structured data using an object-based computer language

[0003] According to a general definition of the method according to the invention, the method comprises the following stages:

[0004] a) receiving a set of data to be processed, structured and linked together, of the value type having a name and/or container having a name and capable of containing at least one value having a name and/or at least one other container having a name;

[0005] b) defining a dictionary object capable of storing/finding in a memory space a container or value under/corresponding to a predetermined name;

[0006] c) creating an empty instance of the dictionary object;

[0007] d) checking whether the structure of the datum to be processed is of the value or container type;

[0008] e) in the case of a datum of the value type, storing/finding the value in the memory space under/corresponding to the name of the datum to be processed, and returning to stage d) until the last datum of the set has been processed;

[0009] f) but in the case of a container-type datum, creating an empty dictionary sub-object according to stage c), filling the dictionary sub-object with the content of the datum to be processed according to stages d) to f), and returning to the stage d) until the last datum of the set has been processed.

[0010] The advantage of the method according to the invention is to permit the generation of extremely rapid applications and a totally flexible structure of object-based data.

[0011] For example, when the method according to the invention is applied to the storage of data in a database, the method according to the invention comprises the following stages:

[0012] 1) providing a database;

[0013] 2) receiving a set of data arranged according to a value-type hierarchical structure having a name and/or container having a name and capable of comprising at least one value and/or at least one other container having a name;

[0014] 3) providing a database instance filled with a dictionary object;

[0015] 4) in the case of a value-type datum, storing or replacing the value under its name in the dictionary object;

[0016] 5) in the case of a container-type datum, verifying whether there is a dictionary object under the name of the datum to be processed;

[0017] 6) if so, filling the dictionary object with the content of the datum and returning to stage 4) until the last datum of the set has been processed, but if not, creating an empty dictionary sub-object and filling the dictionary sub-object with the content of the datum to be processed and returning to stage 4) until the last datum of the set has been processed.

[0018] In practice, the data to be processed are received in the form of a dictionary object in order to be arranged in series consecutively in a selected storage space. In this case, the method according to the invention comprises the following stages:

[0019] I) receiving a dictionary object filled with at least one datum to be stored in a selected storage space;

[0020] II) for each name of a value and/or container stored in the dictionary object, analysing the structure of data contained in the dictionary object under that name;

[0021] III) in the case of a value-type datum, writing in the selected storage space the name of the value followed by a value marker and by the value itself, but in the case of a container-type datum, writing in the selected storage space a container marker, the name of the container, a value marker and the content of the datum to be processed, and an end-of-container marker.

[0022] According to another preferred realisation of the method according to the invention, the dictionary object is capable of storing in addition at least one calculating method under a predetermined name, and of finding as a value under this name the result of the associated calculating method.

[0023] For example, the data to be processed originate from a form or page in which the data are structured and linked to one another with value-type data having a name and/or container having a name and capable of containing a value or a container having a name.

[0024] Further features and advantages of the invention will appear from the detailed description given below of the drawings, which show:

[0025]FIG. 1, a flow-chart illustrating the general stages of the method aci;

[0026]FIG. 2, a flow chart illustrating the method of the invention in the phase of storage of the data in a database; and

[0027]FIG. 3, is a flow chart illustrating the method of updating a database according to the invention.

[0028] The present invention describes a generic mechanism of data encapsulation adapted to any data structure. The encapsulation mechanism according to the invention uses a base object referred to hereinafter as a dictionary object.

[0029] A dictionary object is understood here to mean an object which makes it possible to process (store and/or find) a value-type datum having a name or a container having a name, (the container being capable of itself containing at least one value having a name or at least one other container having a name).

[0030] The base function of a dictionary object is consequently to store in a memory space a container or a value under a predetermined name and also to find in a memory space the container or the corresponding value having a predetermined name.

[0031] The structure of a dictionary object is simple. The class of dictionary objects contains a table of names of the containers and values. The class of dictionary objects also comprises a table of containers and values which are labelled, i.e. arranged according to an index corresponding to that of the names of the containers or values.

[0032] For example, the techniques known as scrambling, such as those known as “hastable” in JAVA language, or those described in the work “The art of computer programming”, Vol 1-3 boxed set HBK, by Donald E Knuth, 1999, make it possible to realise dictionary objects.

[0033] In the prior art, most of the data encapsulation methods suppose that the objects have a predefined structure and that one has precise knowledge of the data structure. The encapsulation process is generally capable of processing data whose structure corresponds to that of the object. For example, a datum having a structure consisting of name, forename, and date of birth is conveniently processed if the object “person” has as variables name, forename and date of birth. On the other hand, the datum “address” is not processed if the structure of the object “person” does not understand this type of variable.

[0034] The method according to the invention makes it possible precisely to encapsulate data whose structure is not known a priori.

[0035] In the example mentioned above, the dictionary object DIC1 according to the invention stores the value “Dupont” in the variable having the name “name”, the value “Paul” in the variable having the name “forename”, and stores a dictionary object DIC2 under the name “address”.

[0036] According to the invention, the dictionary object DIC2 is therefore capable of storing the value “3, allée des Violettes” in the variable having the name “street”; stores the value “Paris” under the name “town”; and stores the value “75012” under the name “postcode”.

[0037] With reference to FIG. 1, the method of processing data according to the invention can be summarised under the following flow chart:

[0038] receive a set of data structured according to a hierarchy and linked together, the structure being of the value type having a name and/or container having a name and capable of containing a value and/or another container having a name (stage 10);

[0039] define a dictionary object capable of storing/finding a container or value in a memory space under/corresponding to a predetermined name (stage 12);

[0040] create an empty instance of the dictionary object (stage 14);

[0041] check whether the structure of the datum to be processed is of the container or value type (stage 16);

[0042] in the case of a value-type datum (stage 18), store/find the value under its name (stage 20), but in the case of a container-type datum (stage 22) create an empty dictionary sub-object (stage 24) according to stage 14, fill the dictionary subobject with the content of the datum (stage 26) according to stages 16 to 32, and return to stage 16 until the last datum of the set has been processed (stages 28, 30 and 32).

[0043] Advantageously, the method according to the invention makes it possible furthermore to add to the data further variables whose values are not present in the objects or containers.

[0044] Thus in the above-mentioned example, the object or container “person” can store the value “date of birth” and be encapsulated in a container “person” which is capable of further displaying the age according to a suitable method of calculation.

[0045] Advantageously the invention makes it possible to process these variables whose values have been obtained by methods of calculation. These values are advantageously arranged according to the invention in the manner of a dictionary object whereby it is possible to associate the name of a value and the method of calculation used in order to supply the value.

[0046] More particularly, after the name of a value has been received, it is checked whether this value name is associated with a method of calculation in the dictionary object. If there is an associated method, it is arranged to calculate the value according to the associated method of calculation and thus to obtain a result. If there is no associated method, it is arranged to search in the dictionary object for data forming a result and to release the corresponding result.

[0047] The method according to the invention has various applications. One of these is to input into a database new data whose structure is not known a priori.

[0048] For example, the data are captured in user interface pages known as forms or capture pages.

[0049] The present invention proposes a formalism whereby it is possible to name each field or variable of the form so as to generate self-structured data which can be updated in a selected storage space (for example, database).

[0050] The formalism consists for example of naming each field of the form in the following manner

[0051] name of object/ name of sub-object 1/ . . . / name of sub-object n/ name of value

[0052] The objects and sub-objects are here containers having a name.

[0053] It should be noted that the oblique/is an arbitrary separator which may be replaced by any other arbitrary character.

[0054] Container end and/or value end markers may also be provided.

[0055] Certain variables (container and/or value) may be empty.

[0056] By means of this formalism, when the data and field names are sent to an application server, it is possible to generate objects (containers) corresponding to the desired data structure.

[0057] For example, a form comprising the following fields and values: - PERSON/NAME DUPONT - PERSON/FORENAME Jean - PERSON/CAR/MAKE Ford - PERSON/CAR/MODEL Escort

[0058] With such a form it is possible to generate the following object:

[0059] Dictionary-type dictionary object Dic 1 stores the value “Dupont” under the field name “name”, the value “Jean” under the field name “forename”, and a dictionary-type dictionary object, Dic 2 under the field name “car”.

[0060] The dictionary-type dictionary object DIC2 therefore stores the value “Ford” under the field name “make” and also the value “Escort” under the field name “model.”

[0061]

[0062]FIG. 2 shows a flow chart which illustrates the storage procedure of a value according to the invention.

[0063] According to stage 100, a dictionary object DIC1, a field name (stage 102) and the corresponding attributed value (stage 104) are provided or received.

[0064] At the end of stages 100, 102 and 104, one can move on to storing the value (stage 106).

[0065] For each field name, the structure of the data contained in the said field under this name are analysed (stage 108). In practice, it is checked whether the field name contains the oblique “/”.

[0066] If the field name does not contain the arbitrary separating character (here an oblique), the value is stored under the name “field name” in the dictionary object (stage 110). Indeed, at this stage, the datum is of the simple variable type, i.e. the type of datum containing only a value under a name.

[0067] On the other hand, if the field name contains the arbitrary separator, this means that the datum is of the “container” type, capable of containing another object or subobject. Then the name of this field is extracted (stage 112) and it is checked whether a sub-object exists in the dictionary object under this name (stage 114).

[0068] If so, the sub-object of the dictionary is obtained (stage 116) and the field name is modified (stage 124) by removing the part preceding the separator “/”, as well as the separator itself (stage 118).

[0069] On the other hand, if there is no sub-object in the dictionary object, it is arranged to create a sub-object (stage 120) and this is stored in the dictionary object.

[0070] When the sub-object is thus created (stage 122), it is arranged to modify the field name (stage 124) by) by removing the part preceding the separator “/”, as well as the separator itself (according to the above-mentioned stage 118).

[0071] After the process has been carried out, one has a sub-object (stage 126), a modified field name (stage 124) and a corresponding value (stage 128), so that it is possible to store the value (stage 130) by reiteration of the process according to stages 108 to 130.

[0072] If the above-mentioned example is used according to the flow chart of FIG. 2, one has a dictionary object corresponding to the description of a person with field names “NAME”, “FORENAME”, and the values “DUPONT” and “JEAN”.

[0073] This dictionary object also comprises a container “CAR” storing the value “FORD” under the field name “MAKE”.

[0074] According to stages 108 to 110, the value “JEAN” is stored in the field name “FORENAME”.

[0075] According to stages 108, 112, 114, 116, 118, 124, 126, 128, 130 and then 108 to 110, the value “ESCORT” is stored in the field name “CAR/MODEL”.

[0076] Finally, according to stages 108, 112, 114, 120, 122, 118, 124, 126, 128, 130 and then 108 to 110, the value “PARIS” is stored in the field name “ADDRESS/TOWN”.

[0077] With reference to FIG. 3, the present invention also has the object of a method of updating the data of a dictionary object encapsulated as described above.

[0078] Starting from what is known as a “software” dictionary object, i.e. one resulting from an encapsulation such as described above (stage 200), and from a database object, known as “static”, i.e. non-encapsulated (stage 202), the procedure “update software object” is ready to start (stage 204).

[0079] The method is contrived to analyse the content (here every name) of the dictionary object to be processed (stages 206 and 208).

[0080] If there is a name, one moves on to the following processing stage (stage 212), if not one ends the process (stage 210).

[0081] If the name corresponds to a simple variable, the value of the variable is updated in the database (stage 214), according to storage methods which are not the subject of the present invention.

[0082] On the other hand, if the data is of the “container” type, it is checked whether there is a static sub-object in the database having this name (stage 216).

[0083] If so, a static sub-object corresponding to this name is searched in the database (stage 218), but in the absence of a static sub-object in the database under this name, it is arranged to create a static sub-object with this name in the database (stage 220).

[0084] At the end of stages 218 or 220, one has a static sub-object, and one obtains the software sub-object of the corresponding dictionary object (stage 224), the sub-object being encapsulated according to the encapsulating process according to the invention.

[0085] At the end of stage 224, one thus has a software sub-object (stage 226) which is homologous with the software object defined at stage 200, and a static sub-object (stage 228), originating from the database, which is homologous with the static object defined at stage 202.

[0086] With these static and software objects, it is possible to update the software (here dictionary) object data (stage 230) in the static object (here the database).

[0087] The present invention is a method of generating an application capable of being implanted by using a formalism of hierarchical data representation and using an object-based computer language of the Java or C++ type or the like.

[0088] The main advantage of the present invention is the capacity to modify dynamically the description diagram of the data, in particular to manage easily new types of objects or new values.

[0089] Moreover, in the case of a client-server application, in which the clients interact with the data (creation, modification, deletion), it is possible with the invention to reference objects of the database in pages on the web forming the user interface. It is thus possible to reference values or containers of values which do not exist in capture forms. Once these formulae have been sent to the application server according to the invention, these new containers and values are created in the database.

[0090] An advantageous, but non-limiting application of the present invention is in the medical field, in particular in the setting up of a healthcare network for managing patient clinical records. 

1. Method of processing data, comprising the following stages: a) receiving a set of data to be processed, structured and linked together, of the value type having a name and/or container having a name and being capable of containing at least one value having a name and/or at least one other container having a name; b) defining a dictionary object capable of storing/finding in a memory space a container or value under/corresponding to a predetermined name; c) creating an empty instance of the dictionary object; d) checking whether the structure of the datum to be processed is of the value or container type; e) in the case of a datum of the value type, storing/finding the value in the memory space under/corresponding to the name of the datum to be processed, and returning to stage d) until the last datum of the set has been processed, but in the case of a container-type datum, creating an empty dictionary sub-object according to stage c), filling the dictionary sub-object with the content of the datum to be processed according to stages d) to e), and returning to stage d) until the last datum of the set has been processed.
 2. Method according to claim 1, applied in the storage of data in a database, characterised in that it comprises the following stages: 1) providing a database capable of containing a set of data arranged according to a value-type hierarchical structure having a name and/or container having a name and being capable of containing at least one value and/or at least one other container having a name, the data being separated from one another by selected markers; 2) receiving a value-type or container-type datum having a name; 3) providing an instance filled with a dictionary object; 4) in the case of a value-type datum, storing or replacing the value under its name in the dictionary object; 5) in the case of a container-type datum, verifying whether there is a dictionary object under that name; 6) if so, filling the dictionary object with the content of the datum and returning to stage 4) until the last datum of the set has been processed, but if not, creating an empty dictionary sub-object according to stage 3) and filling the dictionary sub-object with the content of the datum in accordance with stages 4 to 6 and returning to stage 4) until the last datum of the set has been processed.
 3. Method according to claim 1, wherein data to be processed are received in the form of a dictionary object in order to be arranged in series, one after another, in a selected storage space, characterised in that it further comprises the following stages: I) providing a dictionary object filled with data to be processed; II) for each name of a value and/or container stored in the dictionary object, analysing the structure of data contained in the dictionary object under that name; III) in the case of a value-type datum, writing in the selected storage space the name of the value followed by a value marker and by the value itself, but in the case of a container-type datum, writing in the selected storage space a container marker, the name of the container, a value marker, and the content of the datum to be processed, and an end-of-container marker.
 4. Method according to one of the preceding claims, characterised in that the dictionary object is of the software object type capable of storing furthermore at least one method of calculation under a predetermined name, and of finding as a value under this name the result of this method of calculation.
 5. Method according to any one of the preceding claims, characterised in that the data to be processed originate from a web page in which the data are structured and connected together with value-type data having a name and/or container-type data having a name and capable of containing a value or a container having a name. 